package com.bestcem.xm.component.mybatis.handler;

import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import lombok.extern.slf4j.Slf4j;
import org.bson.types.ObjectId;

/**
 * @ClassName: CustomIdGenerator
 * @Author: chenglong.yue
 * @Date: 2022/7/22 15:42
 */
@Slf4j
public class CustomIdGenerator implements IdentifierGenerator {

    @Override
    public Long nextId(Object entity) {
        return null;
    }

    @Override
    public String nextUUID(Object entity) {
        return new ObjectId().toHexString();
    }
}